home *** CD-ROM | disk | FTP | other *** search
-
-
-
- aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo((((3333ddddmmmm)))) aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo((((3333ddddmmmm))))
-
-
-
- NNNNAAAAMMMMEEEE
- alGetParamInfo - get information about a parameter on a particular audio
- resource
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiioooo....hhhh>>>>
-
- iiiinnnntttt aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo((((iiiinnnntttt rrrreeeessss,,,, iiiinnnntttt ppppaaaarrrraaaammmm,,,, AAAALLLLppppaaaarrrraaaammmmIIIInnnnffffoooo ****ppppiiiinnnnffffoooo))));;;;
-
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- _r_e_s is the audio resource (see aaaallllRRRReeeessssoooouuuurrrrcccceeeessss((((3333ddddmmmm))))) to which the given
- parameter applies.
-
- _p_a_r_a_m
- is the parameter about which you desire information.
-
- _p_i_n_f_o
- is a pointer to an ALparamInfo structure allocated by the caller.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo returns information about the values supported for the
- given parameter _p_a_r_a_m on the given audio resource _r_e_s. The information
- is returned in an ALparamInfo structure:
-
- typedef struct {
- int resource; /* the resource */
- int param; /* the parameter */
- int valueType; /* type of the whole value (scalar,vector,set...) */
- int maxElems; /* maximum number of elements */
- int maxElems2; /* maximum number of elements (2nd dimension) */
- int elementType; /* type of each element (enum, fixed, resource ...) */
- char name[32]; /* name of the parameter */
- ALvalue initial; /* initial value */
- ALvalue min; /* maximum value (range parameters only) */
- ALvalue max; /* maximum value (range parameters only) */
- ALvalue minDelta; /* maximum delta between values (range parameters only) */
- ALvalue maxDelta; /* maximum delta between values (range parameters only) */
- int specialVals; /* special values not between min & max (range parms only) */
- int operations; /* supported operations */
- } ALparamInfo;
-
-
- The fields are defined as follows:
-
- _r_e_s_o_u_r_c_e is the audio resource to which the parameter applies. _P_a_r_a_m is
- the parameter, as passed in to aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo.
-
- _v_a_l_u_e_T_y_p_e is the aggregate type of the value supported for the parameter.
- It indicates whether or not the value consists of a single element
- (AL_SCALAR_VAL) or multiple elements. If there are multiple elements, it
- indicates the relationship between the elements: are they an ordered list
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo((((3333ddddmmmm)))) aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo((((3333ddddmmmm))))
-
-
-
- (AL_VECTOR_VAL and AL_STRING_VAL), an unordered set (AL_SET_VAL), or a
- two-dimensional matrix (AL_MATRIX_VAL)?
-
- _m_a_x_E_l_e_m_s indicates the maximum number of elements that the value can have
- on this particular resource. For scalar values, this is always 1. For
- two-dimensional values, the field _m_a_x_E_l_e_m_s_2 is also used, indicating the
- maximum value for the second dimension.
-
- _e_l_e_m_e_n_t_T_y_p_e indicates the type of each element of the value. The
- supported types are: AL_NO_ELEM, indicating that the parameter has no
- associated value; AL_INT32_ELEM and AL_INT64_ELEM, for 32- and 64-bit
- integer values, respectively; AL_FIXED_ELEM, for 64-bit fixed-point
- values; AL_CHAR_ELEM, for 8-bit characters; AL_RESOURCE_ELEM, for values
- which are audio resources; and AL_ENUM_ELEM, for values which are
- enumerated 32-bit integer values.
-
- Element types are divided into two classes: range types and enumerated
- types. The only two enumerated element types are AL_ENUM_ELEM and
- AL_RESOURCE_ELEM; all the others are considered range types. For
- enumerated types, an application can get the entire set of possible
- values via the aaaallllQQQQuuuueeeerrrryyyyVVVVaaaalllluuuueeeessss call. For range types, the application can
- examine certain properties about the range of values supported. These
- properties are also returned in the ALparamInfo structure; see below.
-
- The _i_n_i_t_i_a_l field gives the value for this parameter on this resource
- when the audio system is first initialized.
-
- The next fields apply only to range parameters. _m_i_n and _m_a_x give the
- minimum and maximum values, respectively. _m_i_n_D_e_l_t_a and _m_a_x_D_e_l_t_a give the
- minimum and maximum difference between any two adjacent values.
- _s_p_e_c_i_a_l_V_a_l_s describes what "special values" may be supported by the range
- parameter. "Special values" are values outside the range described by
- [min, max] and whose semantics may differ from the values inside that
- range. The currently supported special values are: AL_NO_CHANGE, which,
- when given as a value for alSetParams, means "Don't change the value of
- this element;" and AL_NEG_INFINITY, which corresponds to a value of
- negative infinity. Each special value has a corresponding bit in
- specialVals which is set if that value is supported. The token for this
- bit is the name of the special value plus "_BIT," e.g. AL_NO_CHANGE_BIT.
-
- Finally, _o_p_e_r_a_t_i_o_n_s describes what operations are supported by this
- parameter on this resource. To determine if an operation is supported,
- see which of the bits AL_GET_OP, AL_SET_OP, AL_EVENT_OP, and AL_QUERY_OP
- are set in _o_p_e_r_a_t_i_o_n_s. If AL_GET_OP is set, the resource supports
- aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) for that parameter. If AL_SET_OP is set, the resource
- supports aaaallllSSSSeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) for that parameter. If AL_EVENT_OP is set, the
- resource is capable of generating events when the parameter's value
- changes. If AL_QUERY_OP is set, the resource supports calling
- aaaallllQQQQuuuueeeerrrryyyyVVVVaaaalllluuuueeeessss((((3333ddddmmmm)))) for the parameter.
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo((((3333ddddmmmm)))) aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo((((3333ddddmmmm))))
-
-
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEE
- ALparamInfo pinfo;
-
- /*
- * Grab some information about the gain parameter on this resource.
- * We already know that AL_GAIN always takes a 64-bit fixed-point value, so
- * we can assume that's the type of all the ALvalue fields in "pinfo."
- */
- alGetParamInfo(resource, AL_GAIN, &pinfo);
-
- /* Check to see if this resource supports a gain of minus infinity */
- if (pinfo.specialVals & AL_NEG_INFINITY_BIT) {
- printf("supports negative infinity\n");
- }
-
- printf("min: %lf dB; max: %lf dB; best resolution: %lf dB\n",
- alFixedToDouble(pinfo.min.ll),alFixedToDouble(pinfo.max.ll),
- alFixedToDouble(pinfo.minDelta.ll));
-
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Upon successful completion, aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo returns 0. Otherwise
- aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo returns -1 and sets an error number which can be retrieved
- with oooosssseeeerrrrrrrroooorrrr((((3333CCCC)))).
-
- aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmIIIInnnnffffoooo can fail for the following reasons:
-
- AAAALLLL____BBBBAAAADDDD____RRRREEEESSSSOOOOUUUURRRRCCCCEEEE
- _r_e_s_o_u_r_c_e is invalid.
-
- AAAALLLL____BBBBAAAADDDD____PPPPAAAARRRRAAAAMMMM
- _p_a_r_a_m is not supported on the given resource.
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- oserror(3C), alIntro(3dm), alQueryValues(3dm), alSetParams(3dm),
- alGetParams(3dm)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-